import React, { Component } from 'react'
import Header from "../components/Header"
import Footer from "../components/Footer"
import Loading from "../components/Loading"
import { Outlet } from 'react-router-dom'
export default class index extends Component {
  state = {
    loading: true
  }
  componentDidMount() {
    setTimeout(() => {
      this.setState({
        loading: false
      })
    },800);
  }
  render() {
    const { loading } = this.state;
    return (
      <>
        {
          loading ? <Loading></Loading> : <><Header></Header><main><Outlet /></main><Footer></Footer></>
        }
      </>
    )
  }
}
